<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
		<script>
			function Animal(name,age)
			{
				this.name=name;
				this.age=age;
				this.showSelf=function(){
					alert(this.name+",年龄:"+this.age);
				}
			}
			function Dog(name,age,sex)
			{
				Animal.call(this,name,age);
				this.sex=sex;
				this.showSelf2=function(){
					this.showSelf();//做不到
					alert("sex:"+this.sex);
				}
			}
			var d=new Dog("小吴花",3,"公");
			d.showSelf2();
		</script>
	</head>
	<body>
	</body>
</html>
